import 'package:flutter_ncsjqz_getx/generated/json/base/json_convert_content.dart';
import 'package:flutter_ncsjqz_getx/model/platform_msg_entity.dart';

PlatformMsgEntity $PlatformMsgEntityFromJson(Map<String, dynamic> json) {
	final PlatformMsgEntity platformMsgEntity = PlatformMsgEntity();
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		platformMsgEntity.msg = msg;
	}
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		platformMsgEntity.code = code;
	}
	final PlatformMsgData? data = jsonConvert.convert<PlatformMsgData>(json['data']);
	if (data != null) {
		platformMsgEntity.data = data;
	}
	return platformMsgEntity;
}

Map<String, dynamic> $PlatformMsgEntityToJson(PlatformMsgEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['msg'] = entity.msg;
	data['code'] = entity.code;
	data['data'] = entity.data?.toJson();
	return data;
}

PlatformMsgData $PlatformMsgDataFromJson(Map<String, dynamic> json) {
	final PlatformMsgData platformMsgData = PlatformMsgData();
	final int? totalCount = jsonConvert.convert<int>(json['totalCount']);
	if (totalCount != null) {
		platformMsgData.totalCount = totalCount;
	}
	final int? pageSize = jsonConvert.convert<int>(json['pageSize']);
	if (pageSize != null) {
		platformMsgData.pageSize = pageSize;
	}
	final int? totalPage = jsonConvert.convert<int>(json['totalPage']);
	if (totalPage != null) {
		platformMsgData.totalPage = totalPage;
	}
	final int? currPage = jsonConvert.convert<int>(json['currPage']);
	if (currPage != null) {
		platformMsgData.currPage = currPage;
	}
	final List<PlatformMsgDataList>? xList = jsonConvert.convertListNotNull<PlatformMsgDataList>(json['list']);
	if (xList != null) {
		platformMsgData.xList = xList;
	}
	return platformMsgData;
}

Map<String, dynamic> $PlatformMsgDataToJson(PlatformMsgData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['totalCount'] = entity.totalCount;
	data['pageSize'] = entity.pageSize;
	data['totalPage'] = entity.totalPage;
	data['currPage'] = entity.currPage;
	data['list'] =  entity.xList?.map((v) => v.toJson()).toList();
	return data;
}

PlatformMsgDataList $PlatformMsgDataListFromJson(Map<String, dynamic> json) {
	final PlatformMsgDataList platformMsgDataList = PlatformMsgDataList();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		platformMsgDataList.id = id;
	}
	final int? msgType = jsonConvert.convert<int>(json['msgType']);
	if (msgType != null) {
		platformMsgDataList.msgType = msgType;
	}
	final dynamic? msgTypeId = jsonConvert.convert<dynamic>(json['msgTypeId']);
	if (msgTypeId != null) {
		platformMsgDataList.msgTypeId = msgTypeId;
	}
	final int? msgStatus = jsonConvert.convert<int>(json['msgStatus']);
	if (msgStatus != null) {
		platformMsgDataList.msgStatus = msgStatus;
	}
	final String? msgTitle = jsonConvert.convert<String>(json['msgTitle']);
	if (msgTitle != null) {
		platformMsgDataList.msgTitle = msgTitle;
	}
	final String? msgContent = jsonConvert.convert<String>(json['msgContent']);
	if (msgContent != null) {
		platformMsgDataList.msgContent = msgContent;
	}
	final int? userId = jsonConvert.convert<int>(json['userId']);
	if (userId != null) {
		platformMsgDataList.userId = userId;
	}
	final bool? isDel = jsonConvert.convert<bool>(json['isDel']);
	if (isDel != null) {
		platformMsgDataList.isDel = isDel;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		platformMsgDataList.createTime = createTime;
	}
	final int? type = jsonConvert.convert<int>(json['type']);
	if (type != null) {
		platformMsgDataList.type = type;
	}
	final bool? isFollow = jsonConvert.convert<bool>(json['isFollow']);
	if (isFollow != null) {
		platformMsgDataList.isFollow = isFollow;
	}

	return platformMsgDataList;
}

Map<String, dynamic> $PlatformMsgDataListToJson(PlatformMsgDataList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['msgType'] = entity.msgType;
	data['msgTypeId'] = entity.msgTypeId;
	data['msgStatus'] = entity.msgStatus;
	data['msgTitle'] = entity.msgTitle;
	data['msgContent'] = entity.msgContent;
	data['userId'] = entity.userId;
	data['isDel'] = entity.isDel;
	data['createTime'] = entity.createTime;
	data['type'] = entity.type;
	data['isFollow'] = entity.isFollow;
	return data;
}